<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script type="text/javascript">
    var i = 0;
    var iSum = 0;
    do {
        iSum += i;
        i++
    } while (i<100);
    document.write("1-100的所有数之和为" + iSum);
</script>
</body>
</html>